package cn.iocoder.yudao.module.design.convert.wallet;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.design.controller.admin.wallet.vo.recharge.DesignPayWalletRechargeCreateReqVO;
import cn.iocoder.yudao.module.design.controller.admin.wallet.vo.recharge.DesignPayWalletRechargeCreateRespVO;
import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderSubmitRespVO;
import cn.iocoder.yudao.module.pay.controller.app.wallet.vo.recharge.AppPayWalletRechargeCreateReqVO;
import cn.iocoder.yudao.module.pay.controller.app.wallet.vo.transaction.AppPayWalletTransactionRespVO;
import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargeDO;
import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletTransactionDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @author jason
 */
@Mapper
public interface DesignPayWalletRechargeConvert {

    DesignPayWalletRechargeConvert INSTANCE = Mappers.getMapper(DesignPayWalletRechargeConvert.class);

    @Mapping(target = "totalPrice", expression = "java( payPrice + bonusPrice)")
    PayWalletRechargeDO convert(Long walletId, Integer payPrice, Integer bonusPrice, Long packageId);
    DesignPayWalletRechargeCreateRespVO convert(PayWalletRechargeDO bean);

    DesignPayWalletRechargeCreateRespVO convert(PayOrderSubmitRespVO bean);

    AppPayWalletRechargeCreateReqVO  convert(DesignPayWalletRechargeCreateReqVO bean);

    PageResult<AppPayWalletTransactionRespVO> convertPage(PageResult<PayWalletTransactionDO> page);

}
